#!/bin/bash

# solution originally by staxyz at tor.stackexchange.com how do we do copyright on this?
# it should be fair dealing either way.

# PUT ME IN the tor browser directory (ie the one with start-tor-browser) 
# and chmod 755 runtorbrowser.sh
# see https://tor.stackexchange.com/questions/21752/external-links-do-not-open-on-tor-browser
# https://gitlab.torproject.org/legacy/trac/-/issues/12763
# https://gitlab.torproject.org/legacy/trac/-/issues/29254

# NOTE

# this adds a new kind of risk to your computer - ordinarily, if you have firefox and tor browser installed
# and you do not have tor browser as your default  web browser, if someone pops an app / program into your computer that 
# can execute firefox, the vanilla firefox will be executed (ie they can't learn about your tor identity)
# but if you *do* have tor browser installed as your default browser, this happens anyway

# basically if you just use tor browser as a casual user, don't use this script - but if you use it all the time, anyway by default
# it doesn't open up your risk surface *too* much

# however it DOES increase the risk surface, exposing functionality that is not usually used with tor browser: 'remote' firefox sessions
# ie being able to open up multiple instances of firefox at the same time.
# of course in the modern day we call those "tabs" - many users use more than one tab at a time but if you're one of those weirdos
# who does not use more than one tab at once typically, then perhaps you shouldn't use this script either or do your own vetting for it

FOLDER=$(dirname $0)
#echo $FOLDER
#echo $FOLDER/start-tor-browser --allow-remote $@

#echo sleep...
#sleep 1;

$FOLDER/start-tor-browser --allow-remote $@ &

